<?php
global $_GPC, $_W;
$mokuai=pdo_get('zh_gjw_cusmanage',array('phone'=>$_W['username']));
$_W['uniacid']=$mokuai['uniacid'];
$GLOBALS['frames'] = $this->getNaveMenu();
$item=pdo_get('zh_gjw_cusmanage',array('phone'=>$_W['username']));
$item['bannerimg']= explode(',',$item['bannerimg']);
if(checksubmit('submit')){
    $data['bannerimg']=implode(',',$_GPC['bannerimg']);
    $data['latlng']=$_GPC['latlng'];
    $data['storedetail']=html_entity_decode($_GPC['storedetail']);
    // if(empty($item)){                
    //     $res=pdo_insert('zh_gjw_cusmanage',$data);
    //     if($res){
    //         message('添加成功',$this->createWebUrl('cuslatlng',array()),'success');
    //     }else{
    //         message('添加失败','','error');
    //     }
    // }else{
        $res = pdo_update('zh_gjw_cusmanage', $data, array('id' => $_GPC['id']));
        if($res){
            message('', 'referer', 'success');
        }else{
            message('编辑失败','','error');
        }
    // }
}
include $this->template('web/cuslatlng');